import {  unref } from 'vue'

/**
 * 校验表单
 * @param formRef 表单Ref
 * @returns
 */
export const useValidate = async (formRef, fullError = false) => {
    try {
        await unref(formRef).validate()
        return true
    } catch (err) {
        if (fullError) return err
        return false
    }
}
